Skip to content

Fix login/signup in Docker deployments behind reverse proxy#80

Merged
antosubash merged 3 commits intomainfrom
claude/fix-docker-auth-1x4E4
Apr 5, 2026
Merged

Fix login/signup in Docker deployments behind reverse proxy#80
antosubash merged 3 commits intomainfrom
claude/fix-docker-auth-1x4E4

Conversation

@antosubash
Copy link
Copy Markdown
Owner

Three issues prevented auth from working at app.simplemodule.dev:

  1. No ForwardedHeaders middleware — the app behind a reverse proxy saw
    Request.Scheme as "http" and Request.Host as "localhost:8080" instead
    of the real values, breaking cookie security, redirects, and email
    confirmation links.

  2. OpenIddict client redirect URIs were seeded with https://localhost:5001
    because OpenIddict:BaseUrl was never configured in docker-compose.yml.
    Added APP_BASE_URL env var support (defaults to http://localhost:8080).

  3. The seed service skipped updating an existing OAuth client, so changing
    BaseUrl after initial seeding had no effect. Now it updates redirect
    URIs on every startup to match the current configuration.

claude added 3 commits April 5, 2026 11:58
Three issues prevented auth from working at app.simplemodule.dev:

1. No ForwardedHeaders middleware — the app behind a reverse proxy saw
   Request.Scheme as "http" and Request.Host as "localhost:8080" instead
   of the real values, breaking cookie security, redirects, and email
   confirmation links.

2. OpenIddict client redirect URIs were seeded with https://localhost:5001
   because OpenIddict:BaseUrl was never configured in docker-compose.yml.
   Added APP_BASE_URL env var support (defaults to http://localhost:8080).

3. The seed service skipped updating an existing OAuth client, so changing
   BaseUrl after initial seeding had no effect. Now it updates redirect
   URIs on every startup to match the current configuration.
Sets the OAuth redirect URI base to https://app.simplemodule.dev so
login and signup work correctly in production without requiring an
environment variable override.
Move UseForwardedHeaders before UseExceptionHandler so all downstream
middleware sees the correct scheme/host/IP. Fix log message that said
"redirect URIs" when the full client descriptor is updated.
@antosubash antosubash merged commit ab72e16 into main Apr 5, 2026
4 checks passed
@antosubash antosubash deleted the claude/fix-docker-auth-1x4E4 branch April 5, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants